<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../bootstrap-5.1.3-dist/css/bootstrap.css">
    <script src="../bootstrap-5.1.3-dist/js/bootstrap.js"></script>
</head>
<style>
    .box{
        width: 100%;   /*设置宽度*/
        height: 70px;   /*设置高度*/
    }
</style>
<body class="container">
<h3 align="center">自动对齐布局</h3>
<div class="d-flex bg-warning text-white mb-3 box">
    <div class="px-2 bg-primary">家用电器</div>
    <div class="px-2 bg-success align-self-start">办公电脑</div>
    <div class="px-2 bg-danger">男装女装</div>
</div>
<div class="d-flex bg-warning text-white mb-3 box">
    <div class="px-2 bg-primary">家用电器</div>
    <div class="px-2 bg-success align-self-center">办公电脑</div>
    <div class="px-2 bg-danger">男装女装</div>
</div>
<div class="d-flex bg-warning text-white mb-3 box">
    <div class="px-2 bg-primary">家用电器</div>
    <div class="px-2 bg-success align-self-end">办公电脑</div>
    <div class="px-2 bg-danger">男装女装</div>
</div>
<div class="d-flex bg-warning text-white mb-3 box">
    <div class="px-2 bg-primary">家用电器</div>
    <div class="px-2 bg-success align-self-baseline">办公电脑</div>
    <div class="px-2 bg-danger">男装女装</div>
</div>
<div class="d-flex bg-warning text-white mb-3 box">
    <div class="px-2 bg-primary">家用电器</div>
    <div class="px-2 bg-success align-self-stretch">办公电脑</div>
    <div class="px-2 bg-danger">男装女装</div>
</div>
</body>

</html>
